package de.school.cbs.cube;
import javax.media.j3d.*;
import java.util.*;
import java.awt.Color;

public class LedRow {
    private Led[] leds;
    private int y, x;


    public LedRow(int y, int x, int width, float size, TransformGroup group, Observable cube, Color cubeColor) {
        this.leds = new Led[width];
        this.y = y;
        this.x = x;

        for(int i = 0; i < width; i++) {
            Led led = new Led(y, x, i, size, group, cubeColor);
            cube.addObserver(led);
            this.leds[i] = led;
        } 
    }

    public void setPos(int x, int y) {
        this.x = x;
        this.y = y;
    }
}
 
